#! /usr/bin/env python
#coding=utf-8
#!/usr/bin/python
from distutils.core import setup
import py2exe
import sys

manifest = """
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity
    version="5.0.0.0"
    processorArchitecture="x86"
    name="FuckSenWord"
    type="win32"
  />
  <description>FuckSenWord</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
            level="asInvoker"
            uiAccess="false">
        </requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
            type="win32"
            name="Microsoft.VC90.CRT"
            version="9.0.21022.8"
            processorArchitecture="x86"
            publicKeyToken="1fc8b3b9a1e18e3b">
      </assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
  </dependency>
</assembly>
"""

sys.argv.append("py2exe")

setup(
windows = [
    {
    "script":"FuckSenWord.pyw",
    "icon_resources": [(1, "v.ico")],
    "other_resources": [(24,1,manifest)]
    }
],
zipfile = None,
options = {"py2exe":{ 'compressed':1,
                      'optimize':2,
                      'includes':['images', 'AboutDialog','config', 'MainFrame',
                                    'OptionDialog', 'transform', 'wx', 'chardet'],
                      'dll_excludes':['MSVCP90.dll', 'MSVCR71.dll', 'w9xpopen.exe'],
                      'bundle_files': 1,
                      'typelibs' : [("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)],
                    },
                      },
data_files=[('', ['FuckSenWord.ini', 'v.ico'])],
)